//
//  FSNewReceiveCell.m
//  WZSOA
//
//  Created by 刘沿 on 16/6/8.
//  Copyright © 2016年 刘沿. All rights reserved.
//

#import "FSNewReceiveCell.h"

@implementation FSNewReceiveCell

+(instancetype)cellWithTableView:(UITableView*)tableView{
    static NSString * cellIdentifier = @"ReceiveCell";
    FSNewReceiveCell * cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier];
    if (cell == nil) {
        cell  = [[[NSBundle mainBundle] loadNibNamed:@"FSNewReceiveCell" owner:nil options:nil] lastObject];
    }
    
    return cell;
}

-(void)setModel:(FSReceiveModel *)model{

    _model = model;
    self.titleLabel.text = model.title;
    if (model.time.length !=0 && model.state.length !=0 && model.name.length !=0) {
        self.desLabel.text = [NSString stringWithFormat:@"%@/%@/%@",model.time,model.state,model.name];
    }else if(model.time.length !=0 && model.state.length ==0 && model.name.length ==0){
        
        self.desLabel.text = [NSString stringWithFormat:@"%@",model.time];
    }else{
        self.desLabel.text = @"";
    }

    


}

@end
